<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
    <title>可提现奖励</title>
    <script src="__INDEX__/js/mui.min.js"></script>
	<link href="__INDEX__/css/mui.min.css" rel="stylesheet" />
	<link rel="stylesheet" href="__INDEX__/css/iconfont.css" />
	<link rel="stylesheet" href="__INDEX__/css/style.css" />
	<link rel="stylesheet" href="__INDEX__/css/mall.css?1=1" />	
	<script type="text/javascript" src="__INDEX__/dist/jquery.min.js" ></script>
	<script type="text/javascript" src="__INDEX__/js/menudown.js" ></script>
</head>
<body>
	<div class="mui-content" style="height: 100%;">
	    {include file="public/member" /}
	    <div class="glj_bt"><span class="mui-icon iconfont icon-dingdan4" style="font-size: .9rem;"></span><em style="padding-left: 20px;"> 可提现奖励</em><em style="float:right" id="member_balance">金额:{$Think.session.user_info.yj}￥</em></div>
	     <div class="glj_bt1"><span class="mui-icon iconfont icon-dingdan4" style="font-size: .9rem;"></span><em style="padding-left: 20px;">微信提现</em></div>
		    
		    <div class="tixian_pri" style="height: 100%;margin-bottom: 180px;padding-top: 0;">
		    	<p>提现金额</p>
		    	<p class="tixian_prinum clearfix">
		    		<input type="text" id="tixian_money" onkeyup="value=value.replace(/[^\d\.]/g,'')" placeholder="可提现奖励{$Think.session.user_info.yj}￥" />
		    	</p>
		    	<p>收款方实名</p>
		    	<p class="tixian_prinum clearfix">
		    		<input type="text" id="real_name" placeholder="请输入您的真实姓名" />
		    	</p>
		    	<p class="tixian_yue" >1:每笔提现金额至少10元,微信官方收取0.6%手续费</p>
		    	<p class="tixian_yue" >2:每日提线上限为2万元,超出请联系客服</p>
		    	<p class="tixian_yue" >3:为保证您的资金安全,提现申请需实名验证</p>
		    	<p class="tixian_yue" >4:提现申请平台处理后,将直接转入您的微信零钱</p>
		    	<p class="tixian_yue" >5:0-8点是系统升级时间,暂时关闭提现功能</p>
		    	<p class="tixian_yue" >6:如需帮助请联系客服(微信号:18824199998)</p>
		    	 {if $Think.session.user_info.is_rz==1}
				<button class="tixian_btn" onclick="submit_tx()">确认</button>
			{/if}
		    </div>
		   
		</div>
	</div>
	<input type="hidden" id="page" value="1" />
			{include file="public/bottom" /}
</body>
</html>
	{include file="public/footer" /}
<script src="__PUBLIC__/static/js/mui.min.js"></script>
<script>
	function submit_tx(){		
		var ex_num = $("#tixian_money").val();
		var real_name = $("#real_name").val();
		var member_balance = '{$Think.session.user_info.yj}';
		if(ex_num==""||isNaN(ex_num)||parseFloat(ex_num)<=0){
			layer.msg("请输入正确的提现金额");
			return false;
		}
		
		if(real_name==""){
			layer.msg("请输入真实姓名");
			return false;
		}
		
		if(ex_num<10){
			layer.msg("单次提现金额不能小于10元");
			return false;
		}
		if(ex_num>20000){
			layer.msg("单次提现金额不能大于20000元");
			return false;
		}
		
		if(parseFloat(member_balance) < parseFloat(ex_num)){
			layer.msg("奖励不足");
			return false;
		}
		
		$(".tixian_btn").attr('disabled',true);
		
		$.ajax({
             	type:"post",
                url:"{:url('index/member/yj_tixian')}",
                data: {
                	txyj : ex_num,
                	real_name : real_name
                },
                success:function(data){	
                    if(data.code==200){
                    	layer.msg(data.msg, {
						  icon: 1,
						  time: 1500 //2秒关闭（如果不配置，默认是3秒）
						}, function(){
							location.href = "{:url('member/yj')}";
						});
                    }else{
                    	layer.msg(data.msg);
                    }
                },error:function(data){
                	var a = data;
                }
		     });	
	}
</script>
	